Field of the Invention
The present invention relates to an image processing apparatus and an image processing method.
Description of the Related Art
An image deformation process is often necessary in a video processing apparatus. For example, an image deformation process called a keystone (trapezoid) correction process is executed for a projector product. Specifically, when output light of a projector is projected on a screen, a trapezoidal distortion occurs in an effective region projected on the screen, due to an installation angle of the projector, an optical lens shift, or the like. It is hard for the user to see an image with the trapezoidal distortion. Therefore, a process is executed, wherein the effective region is deformed to an inverted trapezoidal shape, and the image is deformed so that the effective region projected on the screen forms a rectangular shape. The image deformation process is generally known as a keystone (trapezoid) correction process.
A frame memory in a size that can hold an input image is generally used in a method of executing the image deformation process. Specifically, there are a method of deforming the image when the input image is written in the frame memory and a method of deforming the image when the image is read from the frame memory. Of these, the method of deforming the image when the input image is written in the frame memory is described in Japanese Patent No. 3394551 (hereinafter, Literature 1). Literature 1 discloses a method of executing an image deformation process by writing pixels of an input image in corresponding addresses on the frame memory. Meanwhile, the method of deforming the image when the image is read from the frame memory is described in Japanese Patent Laid-Open No. 2011-199575 (hereinafter, Literature 2).
In general, a higher resolution, a higher frame rate, and the like are demanded in a video processing apparatus. To meet the demand in the image deformation process, the throughput of the frame memory needs to be improved to improve the processing capacity. To improve the throughput of the frame memory, a type of a memory called a cache memory is usually included in a section of interface with the frame memory. When the frame memory and the cache memory are compared, the frame memory is a low-speed and high-capacity memory, while the cache memory is a high-speed and low-capacity memory. In the configuration of deforming the image when the input image is written in the frame memory, the cache memory is arranged before writing in the frame memory. On the other hand, in the configuration of deforming the image when the image is read from the frame memory, the cache memory is arranged after reading from the frame memory. The arrangement of the cache memory in this way integrates data in the cache memory and reduces the number of data accesses to the frame memory in the image deformation process. As a result, overheads of data accesses can be reduced, resulting in an improvement in the throughput of the frame memory.
Although Literature 1 is a method of deforming the image when the input image is written in the frame memory, the cache memory is not included. On the other hand, Literature 2 is a method of deforming the image when the image is read from the frame memory, and the cache memory is included.
In the image deformation process, deformable shapes are limited due to restrictions on the device configuration. For example, deformations with small deformation magnifications are limited in the configuration with the cache memory in the method of deforming the image when the image is read from the frame memory as in Literature 2. A simple example of reducing an image to 1/N in a transverse direction will be considered. In this case, if the output rate is constant, reading from the frame memory needs to be performed at a speed of N times the output rate on average. More specifically, the cache memory arranged on the reading side of the frame memory needs to read image data from the frame memory at a throughput of N times the output rate. If the image data reading of the cache memory does not reach N times, the output rate to be realized in the cache memory cannot be realized, and the deformed image is ruined.
The phenomenon is an example, and there are actually various deformation restrictions due to restrictions on the cache memory. Therefore, the image deformation apparatus needs to include a method of determining whether the deformation shape designated by the user satisfies various deformation restrictions to allow deformation and notifying the user of the determination. If the method of determining whether the deformation is possible is not included, the deformation shape designated by the user cannot be prevented when the deformation shape does not satisfy the deformation restrictions, and a ruined deformed image is output.
In relation to the cache memory and the deformation restrictions, there are no deformation restrictions derived from the cache memory in the method of Literature 1, because the method does not include a cache memory. However, unlike the case in which the cache memory is used, the processing capacity cannot be improved. On the other hand, the method of Literature 2 includes a cache memory, but does not include means for determining the deformation restrictions. Therefore, deformation shapes that are not allowed to form cannot be prevented.